home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / include / linux / mutex-debug.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-12-24  |  442 b   |  24 lines

  1. #ifndef __LINUX_MUTEX_DEBUG_H
  2. #define __LINUX_MUTEX_DEBUG_H
  3.  
  4. #include <linux/linkage.h>
  5. #include <linux/lockdep.h>
  6.  
  7. /*
  8.  * Mutexes - debugging helpers:
  9.  */
  10.  
  11. #define __DEBUG_MUTEX_INITIALIZER(lockname)                \
  12.     , .magic = &lockname
  13.  
  14. #define mutex_init(mutex)                        \
  15. do {                                    \
  16.     static struct lock_class_key __key;                \
  17.                                     \
  18.     __mutex_init((mutex), #mutex, &__key);                \
  19. } while (0)
  20.  
  21. extern void mutex_destroy(struct mutex *lock);
  22.  
  23. #endif
  24.